package com.situ.firmadmin.service.impl;

import com.situ.firmadmin.mapper.AddressMapper;
import com.situ.firmadmin.pojo.Area;
import com.situ.firmadmin.pojo.City;
import com.situ.firmadmin.pojo.Province;
import com.situ.firmadmin.service.IAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements IAddressService {
    @Autowired
    private AddressMapper addressMapper;


    @Override
    public List<Province> selectAllProvince() {
        return addressMapper.selectAllProvince();
    }

    @Override
    public List<City> selectCityByP(Integer pId) {
        return addressMapper.selectCityByP(pId);
    }

    @Override
    public List<Area> selectAreaByC(Integer cId) {
        return addressMapper.selectAreaByC(cId);
    }
    
    @Override
    public Province selectProvince(Integer provinceId) {
        return addressMapper.selectProvince(provinceId);
    }
    
    @Override
    public City selectCity(Integer cityId) {
        return addressMapper.selectCity(cityId);
    }
    
    @Override
    public Area selectArea(Integer areaId) {
        return addressMapper.selectArea(areaId);
    }
}
